package com.hqyj.sale.controller;


import com.hqyj.sale.dto.SaleInfo;
import com.hqyj.sale.entity.Sale;
import com.hqyj.sale.mapper.SaleMapper;
import com.hqyj.sale.service.SaleService;
import com.hqyj.utils.ResultUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author sdx2009
 * @since 2022-09-30
 */
@RestController
@RequestMapping("/api/sale")
public class SaleController {

    @Autowired
    private SaleService saleService;

    @PostMapping("joinSale")
    public ResultUtils joinSale(SaleInfo saleInfo){
        return saleService.joinSale(saleInfo);
    }

    @PostMapping("saleIndex")
    public ResultUtils saleIndex(SaleInfo saleInfo){
        return saleService.saleIndex(saleInfo);
    }

}
